# coding: utf-8
import tensorflow as tf
import numpy as np
# 使用Keras API加载MNIST数据集
(train_images, train_labels), (test_images, test_labels) = tf.keras.datasets.mnist.load_data()
# 查看前20张训练图片的标签
for i in range(20):
    # 直接获取数字标签
    label = train_labels[i]
    print(f'mnist_train_{i}.jpg label: {label}')